﻿
namespace Pfz.Remoting.Udp
{
	/// <summary>
	/// Interface that must be implemented by drivers that support Udp message communication.
	/// </summary>
	public interface IUdpConnection:
		IAdvancedDisposable
	{
		/// <summary>
		/// Gets the header size present in all received packets.
		/// </summary>
		int UdpHeaderSize { get; }

		/// <summary>
		/// Sends an udp packet.
		/// </summary>
		void UdpSend(byte[] buffer, int offset, int count);

		/// <summary>
		/// Receives a datagram packet.
		/// </summary>
		byte[] UdpReceive();
	}
}
